
cmake_minimum_required(VERSION 3.5.1)

include(cmake/SparkWithGit.cmake)
spark_include(SparkCMakeInfoBeforeConfig.cmake)

project(linux-module-view LANGUAGES CXX VERSION 0.0.1)

spark_initialize_modules()

# 资源文件路径
set(QRC_SOURCES "")

spark_add_executable_path(${PROJECT_NAME}
    src
    src/*/*.cpp
    src/*/*.h
    ${QRC_SOURCES}
)
target_link_qt5(${PROJECT_NAME})

spark_framework_include_with_git(${PROJECT_NAME}
    https://gitee.com/spark-framework-libs/spark-framework-features
    FEATURES qd version screenutil dbusutil
)

# 设置安装路径的前缀(默认为"/usr/local")
set(CMAKE_INSTALL_PREFIX "/usr")

# 设置执行 make install 时哪个目标应该被 install 到哪个位置
install(TARGETS ${PROJECT_NAME} 
    DESTINATION /usr/share/youwant/linux-module-view/)
# CMAKE_INSTALL_PREFIX + "bin" --> /usr/bin

install(FILES linux-module-view.jpg
    DESTINATION share/youwant/linux-module-view/icon)

install(FILES linux-module-view.desktop
    DESTINATION share/applications)

find_package(DebPackage PATHS ${CMAKE_SOURCE_DIR})
add_package_descript(cmake/package-deb.descript)
